package com.easemob.helpdesk.listener;

import android.app.Activity;
import android.app.Application;
import android.os.Bundle;

/**
 * Created by xiaolong.wei on 2018/7/25.
 */

public class HKActivityLifecycleCallbacks implements Application.ActivityLifecycleCallbacks {

    private int count;

    public HKActivityLifecycleCallbacks(int count) {
        this.count = count;
    }

    @Override
    public void onActivityCreated(Activity activity, Bundle savedInstanceState) {

    }

    @Override
    public void onActivityStarted(Activity activity) {
        count++;
    }

    @Override
    public void onActivityResumed(Activity activity) {

    }

    @Override
    public void onActivityPaused(Activity activity) {

    }

    @Override
    public void onActivityStopped(Activity activity) {
        count--;
    }

    @Override
    public void onActivitySaveInstanceState(Activity activity, Bundle outState) {

    }

    @Override
    public void onActivityDestroyed(Activity activity) {

    }

    public int getCount() {
        return count;
    }
}
